<!--搜索栏区域Begin-->
<form class="form-inline">
    <div>
        <div>
            <div class="form-group ext-from-item">
                <label for="vcFundCode">组合代码：</label>
                <input type="text" class="form-control ibt-search-input" name="vcFundCode" id="vcFundCode">
            </div>
            <div class="form-group ext-from-item">
                <label for="vcFundName">组合名称：</label>
                <input type="text" class="form-control ibt-search-input" name="vcFundName" id="vcFundName">
            </div>
            <div class="form-group ext-from-item">
                <label for="jkDate">缴款日期：</label>
                <input type="text" class="form-control ibt-search-input daterangepicker-plugin" name="jkDate" id="jkDate">
            </div>
            <div class="form-group ext-from-item">
                <label for="zqDate">配售公告日期：</label>
                <input type="text" class="form-control ibt-search-input daterangepicker-plugin" name="zqDate" id="zqDate">
            </div>
        </div>
        <div class="form-group ext-from-item">
            <label for="vcNewstockId">证券代码：</label>
            <input type="text" class="form-control ibt-search-input" name="vcNewstockId" id="vcNewstockId">
        </div>
        <div class="form-group ext-from-item">
            <label for="vcNewstockName">证券名称：</label>
            <input type="text" class="form-control ibt-search-input" name="vcNewstockName" id="vcNewstockName">
        </div>
        <div class="form-group ext-from-item">
            <label for="hkInstructionStatus">划款状态：</label>
            <select type="text" class="form-control ibt-search-input" name="hkInstructionStatus" id="hkInstructionStatus">
                <option value=""></option>
                <option value="1">待确认</option>
                <option value="2">待复核</option>
                <option value="4">待审核</option>
                <option value="6">待发送</option>
                <option value="8">已发送</option>
                <option value="9">已到账</option>
                <option value="10">已撤销</option>
                <option value="11">未发送</option>
                <option value="12">未出款</option>
            </select>
        </div>
        <div class="form-group ext-from-item">
            <button type="button" class="btn btn-primary" (click)="search()">查询</button>
            <button type="button" class="btn btn-warning" (click)="resetSearch()">重置</button>
        </div>
        <div class="form-group ext-from-item pull-right">
            <span class="glyphicon glyphicon-th-list"  data-toggle="collapse" data-target=".moreSearch" aria-expanded="false" style="cursor:pointer" title="更多选项"></span>
        </div>
    </div>
    <hr>
    <div id="moreSearch" aria-expanded="false" class="collapse moreSearch">
        <!-- <div class="form-group ext-from-item  col-sm-3">
            <label>指令状态：</label>
            <div class="checkbox form-group">    
                <input name="hkInstructionNotSend" type="checkbox" class="group ibt-search-input" value="true">未发送
                <input name="hkInstructionNotMoney" type="checkbox" class="group ibt-search-input" value="true">未出款
            </div>
        </div> -->
        <div>
            <div class="form-group ext-from-item col-sm-3">
                <label>O32中签确认状态：</label>
                <div class="checkbox form-group">    
                    <label><input type="radio" class="group ibt-search-input" value="1" name="cDealStatus">确认</label>
                    <label><input type="radio" class="group ibt-search-input" value="0" name="cDealStatus">未确认</label>
                </div>
            </div>
            <div class="form-group ext-from-item  col-sm-6">
                <label>到账状态：</label>
                <div class="checkbox form-group">    
                    <label><input type="checkbox" class="group ibt-search-input" value="0" name="cDzStatus">未到账</label>
                    <label><input type="checkbox" class="group ibt-search-input" value="1" name="cDzStatus">到账</label>
                    <label><input type="checkbox" class="group ibt-search-input" value="9" name="cDzStatus">到账异常（金额不一致）</label>
                    <label><input type="checkbox" class="group ibt-search-input" value="2" name="cDzStatus">到账待复核</label>
                    <label><input type="checkbox" class="group ibt-search-input" value="3" name="cDzStatus">取消待复核</label>
                    <label><input type="checkbox" class="group ibt-search-input" value="4" name="cDzStatus">手工到账</label>
                </div>
            </div>
        </div>
        <div>
            <div class="form-group ext-from-item col-sm-3">
                <label>O32缴款确认状态：</label>
                <div class="checkbox form-group">    
                    <label><input type="radio" class="group ibt-search-input" value="1" name="cJkStatus">确认</label>
                    <label><input type="radio" class="group ibt-search-input" value="0" name="cJkStatus">未确认</label>
                </div>
            </div>
            <div class="form-group ext-from-item col-sm-6">
                <label>指令及中签比对：</label>
                <div class="checkbox form-group">    
                    <label><input type="checkbox" class="group ibt-search-input" value="0" name="cMatchResult">未中签</label>
                    <label><input type="checkbox" class="group ibt-search-input" value="1" name="cMatchResult">匹配一致</label>
                    <label><input type="checkbox" class="group ibt-search-input" value="2" name="cMatchResult">匹配不一致</label>
                    <label><input type="checkbox" class="group ibt-search-input" value="3" name="cMatchResult">未中签（手工）</label>
                    <label><input type="checkbox" class="group ibt-search-input" value="4" name="cMatchResult">未下指令</label>
                </div>
            </div>
            <div class="form-group ext-from-item">
                <button type="button" class="btn btn-primary" (click)="setTimeToday('#zqDate')" *ngIf="type != 2">当日中签入围</button>
                <button type="button" class="btn btn-primary" (click)="setTimeToday('#jkDate')" *ngIf="type != 2">当日缴款</button>
            </div>
        </div>
    </div>
</form>
<div class="ibt-fixed-table-container">
    <div class="table-scroll-content">
        <table class="table table-bordered table-hover table-striped table-keep-line">
            <thead>
                <tr role="row">
                    <th>
                        <div class="cell">
                            <input type="checkbox">
                        </div>
                    </th>
                    <th>
                        <div class="cell">O32组合代码
                        </div>
                    </th>
                    <th>
                        <div class="cell">O32组合名称
                        </div>
                    </th>
                    <th>
                        <div class="cell">O32证券代码
                        </div>
                    </th>
                    <th>
                        <div class="cell">O32证券名称
                        </div>
                    </th>
                    <th *ngIf="isShowBallot">
                        <div class="cell">O32申购价格
                        </div>
                    </th>
                    <th *ngIf="isShowBallot">
                        <div class="cell">O32中签数量
                        </div>
                    </th>
                    <th *ngIf="isShowBallot">
                        <div class="cell">O32中签金额
                        </div>
                    </th>
                    <th (click)="changeBallotStatus()">
                        <div class="cell">指令及中签比对
                            <a *ngIf="isShowBallot">
                                <<</a>
                                    <a *ngIf="!isShowBallot">>></a>
                        </div>
                    </th>
                    <th>
                        <div class="cell">万德匹配结果</div>
                    </th>                      
                    <th>
                        <div class="cell">中签文件组合代码</div>
                    </th>
                    <th>
                        <div class="cell">中签文件组合名称</div>
                    </th>
                    <th>
                        <div class="cell">中签文件证券代码</div>
                    </th>
                    <th>
                        <div class="cell">中签文件证券名称</div>
                    </th>
                    <th>
                        <div class="cell">中签文件申购价格</div>    
                    </th>
                    <th>
                        <div class="cell">中签文件中签数量</div>    
                    </th>
                    <th>
                        <div class="cell">中签文件中签金额</div>    
                    </th>
                    <th>
                        <div class="cell">到账金额</div>    
                    </th> 
                    <th>
                        <div class="cell">股东名称</div>
                    </th>
                     <th>
                        <div class="cell">股东代码</div>
                    </th>
                    <th>
                        <div class="cell">席位</div>
                    </th>
                    <th>
                        <div class="cell">配售公告日</div>
                    </th>
                    <th>
                        <div class="cell">缴款日</div>
                    </th>
                    <th>
                        <div class="cell">O32中签确认状态</div>
                    </th>
                    <th>
                        <div class="cell">划款状态</div>
                    </th>
                    <th>
                        <div class="cell">到账状态</div>
                    </th>
                    <th>
                        <div class="cell">O32缴款确认状态</div>
                    </th>                
                </tr>
            </thead>
            <tbody>
                <tr *ngFor="let remittance of remittanceList;" [class.highLight]="remittance.matchResult=='4'||remittance.vcFundCode=='-1'">
                    <td>
                        <div class="cell">
                            <input type="checkbox">
                        </div>
                    </td>
                    <td>
                        <!-- O32组合代码 -->
                        <div class="cell">{{remittance.vcFundCodeO3}}</div>
                    </td>
                    <td>
                        <!-- O32组合名称 -->
                        <div class="cell">{{remittance.vcFundNameO3}}</div>
                    </td>
                    <td>
                        <!-- O32证券代码 -->
                        <div class="cell">{{remittance.vcReportCode}}</div>
                    </td>
                    <td>
                        <!-- O32证券名称 -->
                        <div class="cell">{{remittance.vcStockName}}</div>
                    </td>
                    
                    <td *ngIf="isShowBallot" class="bg-success">
                        <!-- O32申购价格 -->
                        <div class="cell">{{remittance.dealPrice}}</div>
                    </td>
                    <td *ngIf="isShowBallot" class="bg-success">
                        <!-- O32中签数量 -->
                        <div class="cell">{{remittance.dealAmount}}</div>
                    </td>
                    <td *ngIf="isShowBallot" class="bg-success">
                        <!-- O32中签金额 -->
                        <div class="cell">{{remittance.dealBalance}}</div>
                    </td>
                    <td class="bg-success">
                        <!-- 指令及中签比对 -->
                        <div class="cell">{{mathResult[remittance.matchResult]}}</div>
                    </td>
                    <td>
                        <!-- 万德匹配结果 -->
                        <div class="cell">{{remittance.cWindMatchName}}</div>
                    </td>                    
                    <td>
                        <!-- 中签文件组合代码 -->
                        <div class="cell">{{remittance.vcFundCode}}</div>
                    </td>
                    <td>
                        <!-- 中签文件组合名称 -->
                        <div class="cell">{{remittance.vcFundName}}</div>
                    </td>
                    <td>
                        <!-- 中签文件证券代码 -->
                        <div class="cell">{{remittance.vcNewstockId}}</div>
                    </td>
                    <td>
                        <!-- 中签文件证券名称 -->
                        <div class="cell">{{remittance.vcNewstockName}}</div>
                    </td>
                    <td>
                        <!-- 中签文件证券价格 -->
                        <div class="cell">{{remittance.enPrice}}</div>
                    </td>
                    <td>
                        <!-- 中签文件证券数量 -->
                        <div class="cell">{{remittance.lShares}}</div>
                    </td>
                    <td>
                        <!-- 中签文件证券金额 -->
                        <div class="cell">{{remittance.enMoney}}</div>
                    </td>
                    <td>
                        <!-- 到账金额 -->
                        <div class="cell">{{remittance.enDzMoney}}</div>
                    </td>
                    <td>
                        <!-- 股东名称 -->
                        <div class="cell">{{remittance.vcStockholderName}}</div>
                    </td>
                    <td>
                        <!-- 股东代码 -->
                        <div class="cell">{{remittance.withoutName}}</div>
                    </td>
                    <td>
                        <!-- 席位 -->
                        <div class="cell">{{remittance.vcTraceSeat}}</div>
                    </td>
                    <td>
                        <!-- 配售公告日 -->
                        <div class="cell">{{remittance.dzZqImportDate}}</div>
                    </td>
                    <td>
                        <!-- 缴款日 -->
                        <div class="cell">{{remittance.dtHkDate}}</div>
                    </td>
                    <td>
                        <!-- O32中签确认状态 -->
                        <div class="cell">{{(remittance.cDealStatus == '1'? '已确认' : '未确认')}}</div>
                    </td>
                    <td>
                        <!-- 划款状态 -->
                        <div class="cell">{{status[remittance.hkInstructionStatus]}}</div>
                    </td>
                    <td>
                        <!-- 到账状态 -->
                        <div *ngIf="remittance.cDzStatusName!=='到账异常'" class="cell">{{remittance.cDzStatusName}}</div>
                        <a *ngIf="remittance.cDzStatusName==='到账异常'" class="cell" (click)="dzNotTrue(remittance)">{{remittance.cDzStatusName}}</a>
                    </td>
                    <td>
                        <!-- O32缴款确认状态 -->
                        <div class="cell">{{(remittance.cJkStatus === '1'? '已确认' : '未确认')}}</div>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <div class="ibt-table-fixed-content">
        <table class="table table-bordered table-hover table-striped table-keep-line">
            <thead>
                <tr role="row">
                    <th>
                        <div class="cell">
                            <input type="checkbox" name="checkAll" [(ngModel)]="isCheckedAll" (ngModelChange)="checkedAll()">
                        </div>
                    </th>
                    <th>
                        <div class="cell">O32组合代码</div>
                    </th>
                    <th>
                        <div class="cell">O32组合名称
                        </div>
                    </th>
                    <th>
                        <div class="cell">O32证券代码</div>
                    </th>
                    <th style="border-right:2px solid #ccc">
                        <div class="cell">O32证券名称</div>
                    </th>
                </tr>
            </thead>
            <tbody>
                <tr *ngFor="let remittance of remittanceList;">
                    <td>
                        <div class="cell">
                            <input type="checkbox" name="remittance.lNewstockNo" [(ngModel)]="remittance.isChecked" (ngModelChange)="checked(remittance)">
                        </div>
                    </td>
                    <td>
                        <!-- 组合代码 -->
                        <div class="cell">{{remittance.vcFundCodeO3}}</div>
                    </td>
                    <td>
                        <!-- 组合名称 -->
                        <div class="cell">{{remittance.vcFundNameO3}}</div>
                    </td>
                    <td>
                        <!-- 证券代码 -->
                        <div class="cell">{{remittance.vcReportCode}}</div>
                    </td>
                    <td style="border-right:2px solid #ccc">
                        <!-- 证券名称 -->
                        <div class="cell">{{remittance.vcStockName}}</div>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</div>
<div class="row nav-tabs-row-padding">
    <!-- 分页 Begin -->
    <app-pagination
        [currentPageNum]="pageInfo.currentPageNum"
        [pagesShow]="pageInfo.pagesShow"
        [totalPages]="pageInfo.totalPages"
        (pageChanged)="pageNavigation($event)">
        <div class="pull-left pagination-detail" data-pagination-additional="true">
            <span class="pagination-info">
                当前显示第{{pageInfo.startRow}}到第{{pageInfo.endRow}}条&nbsp;&nbsp;&nbsp;&nbsp;总共{{pageInfo.total}}条
            </span>
            <span class="page-list">
                <span class="btn-group dropup">
                    <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                        <span class="page-size">{{pageInfo.pageSize}}</span>
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu">
                        <li *ngFor="let i of pageInfo.pageList" role="menuitem"
                            [class.active]="pageInfo.pageSize === i"
                            (click)="pageSizeChange(i)">
                        <a href="javascript:void(0)">{{i}}</a>
                        </li>
                    </ul>
                </span> 
                条记录每一页
            </span>
        </div>
    </app-pagination>
    <!-- 分页 End-->
</div>
